load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("scm_server_infra")

rust_library(
    name = "caching_commit_graph_storage",
    srcs = glob([
        "src/**/*.rs",
        "schemas/**/*.sql",
    ]),
    named_deps = {"bincode": "fbsource//third-party/rust:bincode-2"},
    test_deps = [
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/common/rendezvous:rendezvous",
        "//eden/mononoke/common/sql_construct:sql_construct",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph_testlib:commit_graph_testlib",
        "//eden/mononoke/repo_attributes/commit_graph/sql_commit_graph_storage:sql_commit_graph_storage",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:maplit",
        "fbsource//third-party/rust:vec1",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//common/rust/shed/memcache_stub:memcache",
        "//common/rust/shed/stats:stats",
        "//eden/mononoke/common/rust/caching_ext:caching_ext",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph_types:commit_graph_types",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph_types/if:commit_graph_thrift-rust",
        "//eden/mononoke/server/context:context",
        "//thrift/lib/rust:fbthrift",
    ],
)
